package com.admin.service;

import com.admin.controller.responseBody.ResponseBody;
import com.admin.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author marisheng
 * @since 2019-11-21
 */
public interface IPermissionService extends IService<Permission> {

    Map findPermissionByRole(int roleId);
    List<ResponseBody> setData(List<Map> list, ResponseBody b);
    ResponseBody setFirstData(List<Map> list);
    List<ResponseBody> add(List<Map> list,ResponseBody root);
    int saveOrDelPermissionByRole(int[] permissionArray, int roleId);

    Map findPermission();

    int savePermission(int[] permissionIdArray, String rolename);

    int permissionInsert(String url, String text, String end, int pid);

    int permissionUpdate(int id,String text,String url,String end);

    Map findUrlById(int id);

    int delById(int id);
}
